package com.YHVision.qiuzhike.service;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.YHVision.qiuzhike.model.dto.postBank.PostBankQueryRequest;
import com.YHVision.qiuzhike.model.entity.PostBank;
import com.YHVision.qiuzhike.model.vo.PostBankVO;

import javax.servlet.http.HttpServletRequest;

/**
 * 职位库服务
 *
 * @author <a href="">YHVision-小y</a>
 * @from <a href="todo">爱编程学习圈</a>
 */
public interface PostBankService extends IService<PostBank> {

    /**
     * 校验数据
     *
     * @param postBank
     * @param add 对创建的数据进行校验
     */
    void validPostBank(PostBank postBank, boolean add);

    /**
     * 获取查询条件
     *
     * @param postBankQueryRequest
     * @return
     */
    QueryWrapper<PostBank> getQueryWrapper(PostBankQueryRequest postBankQueryRequest);
    
    /**
     * 获取职位库封装
     *
     * @param postBank
     * @param request
     * @return
     */
    PostBankVO getPostBankVO(PostBank postBank, HttpServletRequest request);

    /**
     * 分页获取职位库封装
     *
     * @param postBankPage
     * @param request
     * @return
     */
    Page<PostBankVO> getPostBankVOPage(Page<PostBank> postBankPage, HttpServletRequest request);
}
